package com.eamois.ui.office;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import com.hg.jpd.JpdViewer;
import com.hg.xdoc.XDocViewer;

public class PnlOfficeViewer extends JPanel {
	private JPanel panel;
	private XDocViewer jpdViewer;

	/**
	 * Create the panel.
	 */
	public PnlOfficeViewer() {

		initGUI();
	}
	private void initGUI() {
		setLayout(new BorderLayout(0, 0));
		add(getPanel(), BorderLayout.CENTER);
	}

	private JPanel getPanel() {
		if (panel == null) {
			panel = new JPanel();
			panel.setLayout(new BorderLayout(0, 0));
			panel.add(getJpdViewer(), BorderLayout.CENTER);
		}
		return panel;
	}
	private XDocViewer getJpdViewer() {
		if (jpdViewer == null) {
			jpdViewer = new XDocViewer();		
		}
		return jpdViewer;
	}
}
